﻿module Sustainalytics.EsgRatings {

    export class EsgUtility {

        public static getEsgPositionName(esgPosition: EsgPositionEnum): string {

            switch (esgPosition) {
                case EsgPositionEnum.IndustryLeader:
                    return "Industry Leader";
                case EsgPositionEnum.Outperformer:
                    return "Outperformer";
                case EsgPositionEnum.AveragePerformer:
                    return "Average Performer";
                case EsgPositionEnum.UnderPerformer:
                    return "Under Performer";
                case EsgPositionEnum.IndustryLaggard:
                    return "Industry Laggard";
                default:
                    return null;
            }
        }

        public static getEsgOutlookTypeName(esgOutlookType: EsgRpIndicatorOutlookTypeEnum): string {

            switch (esgOutlookType) {
                case EsgRpIndicatorOutlookTypeEnum.Negative:
                    return 'Negative';
                case EsgRpIndicatorOutlookTypeEnum.Neutral:
                    return 'Neutral';
                case EsgRpIndicatorOutlookTypeEnum.Positive:
                    return 'Positive';
            }

            return null;
        }

        public static getTrendTypeName(esgTrendType: EsgRpIndicatorTrendTypeEnum): string {

            switch (esgTrendType) {
                case EsgRpIndicatorTrendTypeEnum.Negative:
                    return 'Negative';
                case EsgRpIndicatorTrendTypeEnum.Neutral:
                    return 'Neutral';
                case EsgRpIndicatorTrendTypeEnum.Positive:
                    return 'Positive';
            }

            return null;
        }

        public static getControversyLevelName(esgControversyLevel: EsgRpControversyLevelEnum) {

            switch (esgControversyLevel) {
                case EsgRpControversyLevelEnum.Low:
                    return 'Low';
                case EsgRpControversyLevelEnum.Moderate:
                    return 'Moderate';
                case EsgRpControversyLevelEnum.High:
                    return 'High';
                case EsgRpControversyLevelEnum.Severe:
                    return 'Severe';
                case EsgRpControversyLevelEnum.Significant:
                    return 'Significant';
            }

            return null;
        }
    }
} 